package com.dongdongshop.service.impl;

import com.dongdongshop.mapper.TbItemMapper;
import com.dongdongshop.model.TbItem;
import com.dongdongshop.service.ItemService;
import com.dongdongshop.vo.ItemVO;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Service;

@Service
public class ItemServiceImpl implements ItemService {

    @Autowired
    private TbItemMapper tm;

    @Override
    public void addItem(ItemVO vo) {
        TbItem tbItem = new TbItem();
        BeanUtils.copyProperties(vo,tbItem);
        tm.insertSelective(tbItem);
    }
}
